<!-- 空数据 -->
<template>
	<uni-transition :show="show" :duration="400">
		<view class="empty">
			<view class="hd">
				<image src="/static/empty.png" mode="widthFix"></image>
			</view>
			<view class="bd">
				<template v-if="tabValue==='all'">
					<view class="txt">还没有大牛接单呢</view>
					<view class="txt" v-if="publisher">分享到其他平台让更多大牛看到</view>
					<view class="txt" v-else>分享给能接单的好友来赚钱</view>
					<view class="btns">
						<button open-type="share" class="btn">分享</button>
					</view>
				</template>
				<template v-else>
					<view class="txt" style="margin-left: -10rpx;">暂无数据</view>
				</template>
			</view>
		</view>
	</uni-transition>
</template>
<script setup>
	import { ref, onMounted } from 'vue';
	defineProps({
		publisher: {
			type: [String, Number, Boolean],
			default: 1
		},
		tabValue: {
			type: [String, Number],
			default: 'all'
		}
	});
	const show = ref(false);
	onMounted(() => {
		show.value = true;
	})
</script>
<style scoped lang="scss">
	@import '@/common/css/base.scss';
	.empty {
		height: 326rpx;
		padding: 20rpx 0 0;
		text-align: center;
		.hd {
			image {
				width: 160rpx;
			}
		}
		.bd {
			.txt {
				line-height: 46rpx;
				font-size: 28rpx;
				color: #666;
			}
			.link {
				display: inline-block;
				color: $color;
			}
			.btns {
				padding: 20rpx 0;
				.btn {
					width: 160rpx;
					height: 60rpx;
					line-height: 60rpx;
					margin: 0 auto;
					border-radius: 10rpx;
					background: $color;
					font-size: 28rpx;
					color: #fff;
				}
			}
		}
	}
</style>
